<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
  // 注意：若表单为POST提交，需处理中文乱码
  request.setCharacterEncoding("UTF-8");

  String studentName = request.getParameter("studentName");
  String classic = request.getParameter("classic");

  if (classic != null && (classic.equals("lunyu") || classic.equals("daodejing") || classic.equals("tangshi"))) {
    request.setAttribute("studentName", studentName);
    request.setAttribute("classic", classic); // 确保此处正确设置属性
%>
<jsp:forward page="certificate.jsp" />
<%
} else {
%>
<jsp:forward page="error.jsp" />
<%
  }
%>
</body>
</html>
